package com.py.pythink.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author wsh
 * @date 2021/7/8 22:56
 */
@Data
@TableName("t_rent")
@NoArgsConstructor
public class Rent {
    @TableId(type = IdType.AUTO)
    private Integer id;//主键id
    private Integer ruid;//租户id
    private Integer fid;//租的房子的id
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ctime;//租房的开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date etime;//租房的结束时间
    private Integer flag;//租的房子的状态码1.有效，2.无效
    private Integer month;//租房子的时间
    private String info;//租房操作记录

    public Rent(Integer ruid, Integer fid, Date ctime, Date etime, Integer flag, Integer month,String info) {
        this.ruid = ruid;
        this.fid = fid;
        this.ctime = ctime;
        this.etime = etime;
        this.flag = flag;
        this.month = month;
        this.info = info;
    }
}
